package abnomity;

/**
 * Version: 1.1
 * Author: TangJun
 * Date: 2024-07-20
 */
public class Test {
    public static void main(String[] args) {
        System.out.println();
        try {
            System.out.println(10 / 0);
            int[] arr = new int[5];
            arr[10] = 0;
            int[] arr1 = null;
            arr1[2] = 3;
        } catch(ArithmeticException|ArrayIndexOutOfBoundsException e) {
            e.printStackTrace();
            System.out.println("算数异常或数组越界异常");
            System.out.println("还能继续运行程序");
        } catch(NullPointerException e) {
            e.printStackTrace();
            System.out.println("空指针异常");
        }
    }

}
